package command;

/**
 * @author shenhan
 * @create 2020/4/8 14:30
 * @description
 */
public class LightOffCommand implements Command {
    LightReceiver receiver;

    public LightOffCommand(LightReceiver receiver) {
        this.receiver = receiver;
    }

    @Override
    public void execute() {
        receiver.off();
    }

    @Override
    public void undo() {
        receiver.on();
    }
}
